// 例子35

let obj = {a: 'apple', 100: 100, 2: 2, b: 'banana', c: 'cartoon'};

for(let key of Object.keys(obj)) {
	console.log(key); // 前后分别输出"2" "100" "a" "b" "c"
}

for(let value of Object.values(obj)) {
	console.log(value); // 前后分别输出2 100 "apple" "banana" "cartoon"
}

for(let [key, value] of Object.entries(obj)) {
	console.log([key, value]); // 前后分别输出["2", 2] ["100", 100] ["a", "apple"] ["b", "banana"] ["b", "cartoon"]
}